//
//  HTTPManagers.h
//  liren
//
//  Created by long on 16/3/8.
//  Copyright © 2016年 Jone. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface HTTPManagers : NSObject
#pragma mark - 一、POST请求

#pragma mark 1 请求数据
/**
 *  POST请求
 *
 *  @param urlStr  url地址
 *  @param params  请求参数
 *  @param success 请求成功调用
 *  @param failure 请求失败调用
 */
+ (void)postWithURL:(NSString*)urlStr
             params:(id)params
            success:(void(^)(id json))success
            failure:(void (^)(NSError *error))failure;

#pragma mark 2 上传数据
    /**
     *  POST请求 (上传带图片文件数据)
 *
 *  @param urlStr     请求路径
 *  @param params  请求参数
 *  @param arrayImageName  图片名字
 *  @param arrayImage  图片文件
 *  @param success 请求成功调用
 *  @param failure 请求失败调用
 */
+ (void)postWithURL:(NSString*)urlStr
             params:(NSDictionary*)params
      formImageName:(NSArray*)arrayImageName
          formImage:(NSArray*)arrayImage
            success:(void(^)(id json))success
            failure:(void(^)(NSError *error))failure;

#pragma mark 3 上传数据
/**
 *  POST请求 (上传图片base64文件数据)
 *
 *  @param urlStr     请求路径
 *  @param image  请求参数
 *  @param success 请求成功调用
 *  @param failure 请求失败调用
 */
+ (void)postWithURL:(NSString*)urlStr
          formImage:(UIImage *)image
            success:(void(^)(id json))success
            failure:(void(^)(NSError *error))failure;

#pragma mark - 二、GET请求

/**
 *  GET请求
 *
 *  @param urlStr   url地址
 *  @param params   请求参数
 *  @param success  请求成功后调用
 *  @param failure 请求失败后调用
 */
+ (void)getWithURL:(NSString*)urlStr
            params:(NSDictionary*)params
           success:(void(^)(id json))success
           failure:(void(^)(NSError *error))failure;
//直播
+ (void)getWithLiveURL:(NSString*)urlStr
            params:(NSDictionary*)params
           success:(void(^)(id json))success
           failure:(void(^)(NSError *error))failure;
//集锦
+ (void)getWithJiJinURL:(NSString*)urlStr
                params:(NSDictionary*)params
               success:(void(^)(id json))success
               failure:(void(^)(NSError *error))failure;
//推荐
+ (void)getWithRecommendURL:(NSString*)urlStr
                 params:(NSDictionary*)params
                success:(void(^)(id json))success
                failure:(void(^)(NSError *error))failure;
//首页
+ (void)getWithHomeURL:(NSString*)urlStr
                     params:(NSDictionary*)params
                    success:(void(^)(id json))success
                    failure:(void(^)(NSError *error))failure;
//比分
+ (void)getWithScoreURL:(NSString*)urlStr
                params:(NSDictionary*)params
               success:(void(^)(id json))success
               failure:(void(^)(NSError *error))failure;
//论坛
+ (void)getWithForum:(NSString*)urlStr
                 params:(NSDictionary*)params
                success:(void(^)(id json))success
                failure:(void(^)(NSError *error))failure;
//赔率
+ (void)getWithOddsURL:(NSString*)urlStr
                 params:(NSDictionary*)params
                success:(void(^)(id json))success
                failure:(void(^)(NSError *error))failure;
//首页视屏
+ (void)getWithHomeVideo:(NSString*)urlStr
                params:(NSDictionary*)params
               success:(void(^)(id json))success
               failure:(void(^)(NSError *error))failure;
//BBS
+ (void)getWithBBSURL:(NSString*)urlStr
               params:(NSDictionary*)params
              success:(void(^)(id json))success
              failure:(void(^)(NSError *error))failure;
+ (void)getWithOpenURL:(NSString*)urlStr
                params:(NSDictionary*)params
               success:(void(^)(id json))success
               failure:(void(^)(NSError *error))failure;

+ (void)postBBSWithURL:(NSString*)urlStr
                params:(id)params
               success:(void(^)(id json))success
               failure:(void (^)(NSError *error))failure;
+ (void)postNBAFootBallWithURL:(NSString*)urlStr
                params:(id)params
               success:(void(^)(id json))success
               failure:(void (^)(NSError *error))failure;
+ (void)postForumUserWithURL:(NSString*)urlStr
                        params:(id)params
                       success:(void(^)(id json))success
                       failure:(void (^)(NSError *error))failure;
+ (void)postLikeWithURL:(NSString*)urlStr
                      params:(id)params
                     success:(void(^)(id json))success
                     failure:(void (^)(NSError *error))failure;
+ (void)postCommentWithURL:(NSString*)urlStr
                    params:(id)params
                   success:(void(^)(id json))success
                   failure:(void (^)(NSError *error))failure;
+ (void)postCommentAddWithURL:(NSString*)urlStr
                       params:(id)params
                      success:(void(^)(id json))success
                      failure:(void (^)(NSError *error))failure;
@end
